Use user request 'Host' replace conf.Server.ExternalURL
in internal/route/lfs /batch.go
#7741
Open
1 task done
Labels
🎯 feature
Categorizes as related to a new feature
Describe the feature
Because
gogs
may be reverse proxied, accessed by IP address on an internal network, or accessed by multiple different domain names on an external network.Therefore, these access methods will directly return the
conf.Server.ExternalURL
address when using LFS.gogs/internal/route/lfs/batch.go
Line 37 in c8cd3e7
This will cause two problems:
When pulling
lfs objects
, it will prompt for login again.When the
ExternalURL
is configured as an internal IP, accessing the domain name from external network will return the configured internal IP when pullingLFS objects
.Describe the solution you'd like
gogs/internal/route/lfs/batch.go
Line 37 in c8cd3e7
Replace
conf.Server.ExternalURL
with Host in the user's request.Describe alternatives you've considered
None
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: